<%-- 
    Document   : pagination
    Created on : 2014-8-29, 15:20:15
    Author     : coolwind
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<c:if test="${!empty start}">
    <div class="pagination-bar">
        <ul class="pagination">
            <li><a href="<c:url value="/blog/page/${prevPage}"/>">&laquo;</a></li>
                <c:forEach begin="${start}" end="${end - 1}" var="tagx" >
                    <c:choose>
                    
                        <c:when test="${tagx == curPage}">
                        <li class="active"><a href="<c:url value="/blog/page/${tagx}"/>">${tagx + 1}</a></li>
                        </c:when>
                        <c:otherwise>
                        <li><a href="<c:url value="/blog/page/${tagx}"/>">${tagx + 1}</a></li>
                        </c:otherwise>
                    </c:choose>
                </c:forEach>
            <li><a href="<c:url value="/blog/page/${nextPage}"/>">&raquo;</a></li>
        </ul>
    </div>
</c:if>